listview: Add GtkListItem::focusable property
authorBenjamin Otte <otte@redhat.com>
Sat, 25 Mar 2023 23:50:45 +0000 (00:50 +0100)
committerBenjamin Otte <otte@redhat.com>
Sat, 1 Apr 2023 18:49:40 +0000 (20:49 +0200)
commitce531ce280e6f34c223b976d54cb7a354a22e62f
treece4a7e18cbe73c21ca8d53e8eca10de7a73ec0c5
parenteb0541c9d18a165b4b9e6bb2c68cd72d9fc2f4d2
listview: Add GtkListItem::focusable property

This makes the question if a listitem can be focused or not an explicit
decision by application developers.

Previously an item could be focused if it was selectable and no child or
grandchild was focusable - so if you put a label and icon into it, the
item was focusable, but if you put a GtkTreeExpander or a GtkButton into
it, the item wasn't. This needs to be decided explicitly now.

Technically this is an API break, because the previous behavior does not
exist anymore.
But I really don't want to make this a tristate (focusable, not
focusable, automatic), because then binding it to other things gets
hard, and because all the other focusable proeprties are booleans, too,
and working with them gets a lot harder.

Related: #3910
demos/gtk-demo/main-listitem.ui
gtk/gtklistitem.c
gtk/gtklistitem.h
gtk/gtklistitemprivate.h
gtk/gtklistitemwidget.c